<?php
	// If Process type is PREVIEW/EDIT/DELETE, Get All variables needed to be displayed by form, Edit SQL & Variable if necessary !!!
	if($process_type == "PREVIEW" || $process_type == "EDIT" || $process_type == "DELETE")
	{
		$sql2 = "select * from tbl_contact_us where stsrc = 'A' and contactusid = '".$PK_id."' ";
		$exe2 = mysql_query($sql2) or die(mysql_error());
		$num2 = mysql_num_rows($exe2);
		$row2 = mysql_fetch_array($exe2);
		
		// Set Value if data is found
		if($num2>0)
		{
			$val_contactus_PK_id = $row2['contactusid'];
			$val_contactus_name = $row2['contactusname'];
			$val_contactus_address = sql_quote_html_sc_de($row2['contactusaddress']);
			$val_contactus_email = $row2['contactusemail'];
			$val_contactus_message = sql_quote_html_sc_de($row2['contactusmessage']);
			$val_contactus_status = $row2['contactusstatus'];
		}
		else
		{
			$val_contactus_PK_id = "";
			$val_contactus_name = "";
			$val_contactus_address = "";
			$val_contactus_email = "";
			$val_contactus_message = "";
			$val_contactus_status = "";
		}
	}
	else
	{
		$val_contactus_PK_id = "";
		$val_contactus_name = "";
		$val_contactus_address = "";
		$val_contactus_email = "";
		$val_contactus_message = "";
		$val_contactus_status = "";
	}
	
?>
<!-- Start Row Data -->
<div class="divFormRowData">
	<div style="float:left; contactus-align:right; width:<?php echo $rowDivWidth; ?>px;">Name</div>
	<div style="float:left;">&nbsp;:&nbsp;</div>
	<div style="float:left;">
		<input type="hidden" name="txt_contactus_name" value="<?php echo $val_contactus_name; ?>" style="width:200px; height:18px;" />
		<input <?php if($process_type == "PREVIEW" || $process_type == "EDIT" || $process_type == "DELETE"){echo "disabled='disabled'";} ?> type="text" required name="txt_contactus_name" value="<?php echo $val_contactus_name; ?>" style="width:300px; height:18px;" />
	</div>
	<div style="clear:both;"></div>
</div>
<div class="divFormRowData">
	<div style="float:left; contactus-align:right; width:<?php echo $rowDivWidth; ?>px;">Address</div>
	<div style="float:left;">&nbsp;:&nbsp;</div>
	<div style="float:left;">
		<textarea <?php if($process_type == "PREVIEW" || $process_type == "EDIT" || $process_type == "DELETE"){echo "disabled='disabled'";} ?> name="txt_contactus_address" style="width:300px; height:100px; max-width:300px; max-height:100px;"><?php echo textarea_string($val_contactus_address); ?></textarea>
	</div>
	<div style="clear:both;"></div>
</div>
<div class="divFormRowData">
	<div style="float:left; contactus-align:right; width:<?php echo $rowDivWidth; ?>px;">Email</div>
	<div style="float:left;">&nbsp;:&nbsp;</div>
	<div style="float:left;">
		<input <?php if($process_type == "PREVIEW" || $process_type == "EDIT" || $process_type == "DELETE"){echo "disabled='disabled'";} ?> type="text" required name="txt_contactus_email" value="<?php echo $val_contactus_email; ?>" style="width:300px; height:18px;" />
	</div>
	<div style="clear:both;"></div>
</div>
<div class="divFormRowData">
	<div style="float:left; contactus-align:right; width:<?php echo $rowDivWidth; ?>px;">Message</div>
	<div style="float:left;">&nbsp;:&nbsp;</div>
	<div style="float:left;">
		<textarea <?php if($process_type == "PREVIEW" || $process_type == "EDIT" || $process_type == "DELETE"){echo "disabled='disabled'";} ?> name="txt_contactus_message" style="width:300px; height:150px; max-width:300px; max-height:150px;"><?php echo textarea_string($val_contactus_message); ?></textarea>
	</div>
	<div style="clear:both;"></div>
</div>
<div class="divFormRowData">
	<div style="float:left; contactus-align:right; width:<?php echo $rowDivWidth; ?>px;">Status</div>
	<div style="float:left;">&nbsp;:&nbsp;</div>
	<div style="float:left;">
		<input type="hidden" name="txt_contactus_PK_id" value="<?php echo $val_contactus_PK_id; ?>" style="width:200px; height:18px;" />
		<input <?php if($process_type == "PREVIEW" || $process_type == "DELETE"){echo "disabled='disabled'";} ?> type="radio" name="rdo_contactus_status" value="1" <?php if(isset($val_contactus_status)){if($val_contactus_status == 1){echo "checked='true'";}} ?> /> Checked
		<input <?php if($process_type == "PREVIEW" || $process_type == "DELETE"){echo "disabled='disabled'";} ?> type="radio" name="rdo_contactus_status" value="0" <?php if(isset($val_contactus_status)){if($val_contactus_status == 0){echo "checked='true'";}} ?> /> Pending
	</div>
	<div style="clear:both;"></div>
</div>
<!-- End Row Data -->